<div class="tab-box">
    <ul>
        <li ng-repeat="(i,item) in tabMenu.children track by $index"
        	ui-sref="{{item.state}}({id:i})"
        	ng-class="{active:i==0}">
        	{{item.name}}
        </li>
    </ul>
</div>

<div style="padding: 20px;" ng-if="state==1">
    <div style="margin-bottom: 20px;"><b>该系统已拥有应用：</b></div>
    <div class="app-case" ng-repeat="(key, item) in dataList" ng-click="linkApp(item)">
        <div class="app-img"><img src="item.photo_url" alt=""></div>
        <p>{{item.name}}</p>
    </div>
</div>
<!-- 贷款计算器 -->
<div ng-if="state==2" class="app-detail">
    <div style="padding: 0 20px 20px 20px;">
        <div class="app-case">
            <div class="app-img"><img src="data.app.photo_url" alt=""></div>
        </div>
        <ul class="name-app">
            <li><span>应用名称：{{data.app.name ||'--'}}</span></li>
            <li><span>上架时间：{{data.app.create_time ||'--'}}</span></li>
            <li><span>累计使用：{{data.app.use_count ||'--'}}</span></li>
        </ul>
    </div>
    <div style="border-bottom: 1px solid #ddd;"></div>
    <div class="app-calc">
        <ul>
            <li>贷款产品：</li>
            <li class="app-produc">
                <i class="icon icon-saveok" ng-click="loanSelect('xin','3')" ng-class="{'saveok-sect':loanType.xin}" ><span>信贷</span><i class="icon icon-xindaitong"></i></i>
                <i class="icon icon-saveok" ng-click="loanSelect('che','1')" ng-class="{'saveok-sect':loanType.che}" ><span>车贷</span><i class="icon icon-fangdaitong"></i></i>
                <i class="icon icon-saveok" ng-click="loanSelect('fang','2')" ng-class="{'saveok-sect':loanType.fang}" ><span>房贷</span><i class="icon icon-chedaitong"></i></i>
            </li>
            <li>贷款金额：</li>
            <li>
                <div class="input-bind-unit">
                    <input onkeyup="value=value.replace(/[^\d]/g,'')" ng-focus="remlight()" ng-class="{'error':err.loan_money}" class="form-control ng-pristine ng-untouched ng-valid ng-empty" type="text" ng-model="data.loan_money">
                    <span>元</span>
                </div>
            </li>
            <li>贷款期限：</li>
            <li>
                <ui-select ng-model="data.at_id" error-tis="err.at_id">
                    <ui-option ng-repeat="(i,item) in option.period track by $index" value="item.id" value="select">{{item.param_name}}</ui-option>
                </ui-select>
            </li>
            <li>年利率：</li>
            <li>
                <div class="input-bind-unit" >
                    <input onkeyup="value=value.replace(/[^\d]/g,'')" ng-focus="remlight()" ng-class="{'error':err.interest}" class="form-control ng-pristine ng-untouched ng-valid ng-empty" type="text" ng-model="data.interest">
                    <span>%</span>
                </div>
            </li>
        </ul>
    </div>
    <div class="calc-puts" style="margin-left: 30px;">
        <p>等额等息计算结果：</p>
        <table>
            <tbody>
                <tr>
                    <td>贷款总额</td>
                    <td><span class="cal-show">{{result.loan_money}}</span>元</td>
                </tr>
                <tr>
                    <td>贷款期数</td>
                    <td><span class="cal-show">{{result.num}}</span>期</td>
                </tr>
                <tr>
                    <td>每月还款</td>
                    <td><span class="cal-show">{{equalResult.month_pay}}</span>元/月</td>
                </tr>
                <tr>
                    <td>总支付利息</td>
                    <td><span class="cal-show">{{result.pay_interest}}</span>元</td>
                </tr>
                <tr>
                    <td>本息合计</td>
                    <td><span class="cal-show">{{result.total}}</span>元</td>
                </tr>
            </tbody>
        </table>
    </div>
    <div class="calc-puts">
        <p>先息后本计算结果：</p>
        <table>
            <tbody>
                <tr>
                    <td>贷款总额</td>
                    <td><span class="cal-show">{{result.loan_money}}</span>元</td>
                </tr>
                <tr>
                    <td>贷款期数</td>
                    <td><span class="cal-show">{{result.num}}</span>期</td>
                </tr>
                <tr>
                    <td>每月还款</td>
                    <td><span class="cal-show">{{result.month_pay}}</span>元/月</td>
                </tr>
                <tr>
                    <td>总支付利息</td>
                    <td><span class="cal-show">{{result.pay_interest}}</span>元</td>
                </tr>
                <tr>
                    <td>本息合计</td>
                    <td><span class="cal-show">{{result.total}}</span>元</td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
<div ng-if="state==2" class="ensure-btn">
    <button class="btn btn-radius">返回应用列表</button>
    <button class="btn btn-radius btn-sct" ng-click="resureCalc()">&nbsp;&nbsp;&nbsp;&nbsp;确定计算&nbsp;&nbsp;&nbsp;&nbsp;</button>
</div>
